package com.lagou.edu.config;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
@EnableConfigServer // 配置中心
@EnableDiscoveryClient // 服务发现
public class LagouConfigServer {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(LagouConfigServer.class, args);
        System.out.println("服务启动完成，当前环境为：" + run.getEnvironment().getProperty("env"));
    }

}
